<!-- 采用模块封装 -->
<template>
  <div>
    <!-- 表格区域 -->
    <el-table :data="tableData" v-loading="loading" border style="width: 100%">
      <el-table-column prop="id" label="用户ID" align="center">
      </el-table-column>
      <el-table-column prop="userId" label="所属班级" align="center">
      </el-table-column>
      <el-table-column prop="title" label="作业名称" align="center">
      </el-table-column>
      <el-table-column prop="completed_text" label="完成情况" align="center">
      </el-table-column>
    </el-table>
    <!-- 分页区域 -->
    <Page :total="total" :url="url"></Page>
  </div>
</template>

<script>
import Page from '../common/PageServer.vue'

export default {
  components: {
    Page
  },
  data () {
    return {
      tableData: [],
      page: 1,
      size: 10,
      total: 0,
      url: '/works',
      loading: true
    }
  },
}
</script>

<style lang="less">
.pagination {
  margin-top: 10px;
}
</style>